package com.haelth.comman;

import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;

import org.jsoup.Connection;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;

public class Testhealth {

	/**
	 * @param args
	 * @throws IOException
	 * @throws URISyntaxException
	 * @throws InterruptedException
	 */
	public static void main(String[] args) throws IOException,
			URISyntaxException, InterruptedException {

		Connection cont = Jsoup.connect(
				"http://www.nhi.gov.tw/Query/query1_list.aspx?Q1ID=B025033161")
				.timeout(50000);
		Document doc = cont.get();

		// Elements newsHeadlines = doc.select("body");
		// System.out.println(newsHeadlines.toString());

		Element newsHeadline = doc
				.getElementById("gvQuery1Data_ctl02_lblNameChinese");
		System.out.println(newsHeadline.text());
		System.out.println(doc);

	}

}
